﻿#include <QApplication>
#include <QLabel>
#include <QMovie>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QLabel *lbl = new QLabel("show gif");
    //从命令行中读取文件，方便直接双击打开
    QMovie *movie = new QMovie(QString::fromLocal8Bit(argv[1]));//不要忘了支持中文文件名
    lbl->setMovie(movie);
    movie->start();

    lbl->show();
    return a.exec();
}